1. Field of the Invention
The present invention relates to an apparatus and a method for controlling a motor, capable of accurately detecting a speed of a motor, by computing the number of pulses of a first signal included in respective sub periods by dividing a predetermined sampling period into a plurality of sub periods, in connection with a first signal having a pulse form indicating a speed of a motor, in detecting the speed of the motor, method of and when the number of pulses of the first signal included in respective sub periods is different, that is, when the speed of the motor is not constant but changed, by allocating different weights to the number of pulses included in respective sub periods or controlling the number of sub periods dividing a sampling period.
2. Description of the Related Art
When a motor is operated, an output signal of a sensor detecting a position and a speed of a rotor may be generated in pulse form. A speed of a motor, a position of a rotor, and the like, are detected by using the sensor signal generated in pulse form, such that the motor may be controlled so as to be operated at a required speed. Therefore, in order for a motor to be precisely controlled at a required state, the speed, the position, and the like, of the motor, need to be accurately detected.
When the number of pulses included in the sensor signal at the time of rotating the rotor once is defined as pulses per rotation (PPR), revolutions per minute (RPM) of the motor may be defined as follows.
                    Revolutions        ⁢                                  ⁢        per        ⁢                                  ⁢        minute        ⁢                                  ⁢        of        ⁢                                  ⁢        motor        ⁢                                  ⁢                  60          Tc                ⁢                  n          PPR                                    Equation        ⁢                                  ⁢        1            
In Equation 1, Tc represents a sampling period detecting the number of pulses included in the sensor signal and n represents the number of pulses included in one sampling period.
When the number of pulses included in a predetermined sampling period is detected, the sampling period and the pulse are not synchronized with each other, such that an error may occur in terms of the number of pulses. In particular, in the above Equation 1, when n=1, a relatively larger error may occur in detection of RPM of the motor and the error in the RPM of the motor may be reduced by increasing the PPR, simply by increasing Tc. However, when Tc is increased, the sampling period detecting the number of pulses may be relatively long, affecting the computation of the speed of the motor from the detection time of the speed of the motor to the previously generated pulse. Therefore, there is a problem in that Tc may not increase infinitely in order to reduce the error in the detection of RPM of the motor.
The related art document below relates to a sensor module and discloses that a sensor module detects the speed of a motor by changing a sampling period. However, the related art document below only discloses detecting the speed of a motor based on a variable sampling period and does not disclose accurately detecting the speed of a motor without significantly increasing the sampling period by dividing one sampling period into a plurality of sub periods while leaving the entire sampling period the same.
[Related Art Document]
Japanese Patent Laid-Open Publication No. JP 2008-051587